package com.infore.operation.mapper;

import com.infore.operation.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import java.util.Map;

/**
 * @author:wk
 * @date:Created in 10:35 2018\4\17 0017
 */
public interface StatisticsMapper {

    List<Map<String,Object>> queryFaultStatistics(@Param("value") String sql);

    Map<String,Object> queryForMap(@Param("value") String sql);

    List<QualityList> queryQualityList(@Param("userId")String userId);

    Quality queryQualityMessage(@Param("id")String id);

    List<Image> queryImage(@Param("id")String id);

    Integer saveQuality(Quality quality);

    void saveQualityImage(@Param("images")List<Image> images);

    List<NQualityList> queryQualityArtisanSqeList(@Param("state")String state,@Param("userId")String userId,@Param("postId")Integer postId);

    void updateQualityArtisan(@Param("userId")String userId,@Param("suggestion")String suggestion,@Param("time")String time,@Param("state")Integer state,@Param("id")String id);

    void updateQualitySqe(@Param("userId")String userId,@Param("scheme")String scheme,@Param("measures")String measures,@Param("causes")String causes,@Param("time")String time,@Param("state")Integer state,@Param("id")String id);

    void saveSuggestion(@Param("type")String type,@Param("userId")String userId,@Param("suggestion")String suggestion,@Param("aspectOn")String aspectOn,@Param("anonymity")String anonymity,@Param("title")String title);

    List<Suggestion> querySuggestionList(@Param("userId")String userId,@Param("sortType")String sortType,@Param("suggestionState")String suggestionState);

    Integer querySuggestionSupport(@Param("suggestionId")String suggestionId,@Param("userId")String userId);

    void deleteSuggestionSupport(@Param("suggestionId")String suggestionId,@Param("userId")String userId);

    void saveSuggestionSupport(@Param("suggestionId")String suggestionId,@Param("userId")String userId);

    List<Suggestion> searchSuggestion(@Param("userId")String userId,@Param("branchId")String branchId,@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("suggestionType")String suggestionType,@Param("keyword")String keyword,@Param("sortType") String sortType);
}
